Most computers, even portable and hand-held computers, are connected to one or more networks. Network connectivity allows a computer to send and receive a wide range of data, which in turn enables the computer to execute applications that perform many useful functions based on that data.
A combination of communication hardware and software components is used to configure a computer for network communication. A network interface in the computer typically includes a physical network interface device and a software driver that provides a programming interface to the physical network interface device. Communication software within the operating system for the computer interacts with the network interface through the programming interface.
When an application needs to transmit data over the network, the application provides the data to the communication software. The communication software typically forms the data into packets, which are then passed through the programming interface to the physical network interface device for transmission over the network.
When data is sent over the network to an application on the computer, the physical interface device receives packets of data over the network, and places the data in memory. The network interface then notifies the communication software and the communication software uses information transmitted with the packet to determine the application that is intended as the destination for the data in the packet. The communication software then transfers the received data to a buffer used by the destination application and notifies that application that data is available. The destination application can then use the data.
Network packets are communicated in accordance with one or more network protocols to allow communication hardware and software to appropriately process each packet. Frequently, network communications are formatted based on multi-layered protocols. Each protocol layer specifies information needed for routing packets through various portions of the network. The information associated with each protocol layer is typically processed separately. For this reason, communication software within a computer is often described as a “stack.” The stack contains multiple components, each for processing packets in accordance with one of the protocol layers.
Processing within the stack may format data for transmission over the network. For received packets, processing may involve identifying the intended destination of data transmitted over the network. In addition, processing within the stack may involve maintaining state information needed to communicate in accordance with a network protocol.
In some computers, processing that is traditionally performed in the stack is “offloaded” to the physical network interface device. Applications transmitting messages may bypass the network stack and provide data to be transmitted over the network directly to the network interface device through the network interface driver. For received packets, the network interface device may bypass the network stack and provide received data to an application that is the intended destination for the data.